extends Node2D

var configRootPath = "res://Assets/Configs/CSV/"

var battleFieldStateHeroRoundSelectHero = "StateHeroRoundSelectHero"
var battleFieldStateHeroRoundReady2Move = "StateHeroRoundReady2Move"
var battleFieldStateHeroRoundHeroMove = "StateHeroRoundHeroMove"
var battleFieldStateHeroRoundAcceptCommand = "StateHeroRoundHeroAcceptCommand"
var battleFieldStateHeroRoundExecuteCommand = "StateHeroRoundHeroExecuteCommand"
var battleFieldStateRoundTransition = "StateRoundTransition"
var battleFieldStateEnemyRoundEnemyMove = "StateEnemyRoundEnemyMove"
var battleFieldStateEnemyRoundEnemyExecuteCommand = "StateEnemyRoundEnemyExecuteCommand"

var battleEntityStateIdle = "StateIdle"
var battleEntityStateReady2Move = "StateReady2Move"
var battleEntityStateMove = "StateMove"
var battleEntityStateCommand = "StateCommand"
var battleEntityStateHit = "StateHit"

var playerStateNormal = "StateNormal"

var battleEntityCommandMap = {
	"轻攻击": "StateNormalMeleeAttack",
	"待命": "StateWait"
}

var attackAnimationHitFrame = {
	"AttackLeft": 2,
	"AttackUp": 2,
	"AttackRight": 2,
	"AttackDown": 2
}

#other
const GROUP_PLAYER = "GROUP_PLAYER"
const GROUP_SCENE_CAMERA = "SceneCamera"
const GROUP_BATTLEFIELD = "BattleField"
const SCENE_CAMERA_NAME = "Camera2D"
const PLAYER_NODE_NAME = "Player"
const PROP_TEMPLATE_ATTACK = "2"
const PROP_TEMPLATE_DEFENCE = "1"
const ATTR_TEMPLATE = "5"
const ITEMINFO_TEMPLATE_EQUIPMENT = "3"
const ITEMINFO_TEMPLATE_WEAPON = "4"
const POPUP_TEMPLATE_WEAPON = "6"
const POPUP_TEMPLATE_EQUIPMENT = "6"
const EPSILON = 1e-5

#attribute name
const ATTR_LIFE = "life"
const ATTR_FOCUS = "focus"
const ATTR_STRENGTH = "strength"
const ATTR_INTELLIGENCE = "intelligence"
const ATTR_DEXTERITY = "dexterity"
const ATTR_LUCKY = "lucky"

#property name
const PROP_LV = "lv"
const PROP_STORY = "story"
const PROP_NAME = "name"
const PROP_TYPE = "type"
const PROP_TYPE_NAME = "typeName"
const PROP_HP = "hp"
const PROP_MAX_HP = "maxHp"
const PROP_MP = "mp"
const PROP_MAX_MP = "maxMp"
const PROP_ATTACK_TYPE = "attackType"
const PROP_ATTACK_TYPE_NAME = "attackTypeName"
const PROP_PHYSICAL_ATTACK = "physicalAttack"
const PROP_FIRE_ATTACK = "fireAttack"
const PROP_THUNDER_ATTACK = "thunderAttack"
const PROP_BONUS_PHYSICAL_ATTACK = "bonusPhysicalAttack"
const PROP_BONUS_FIRE_ATTACK = "bonusFireAttack"
const PROP_BONUS_THUNDER_ATTACK = "bonusThunderAttack"
const PROP_POISON = "poison"
const PROP_BLEED = "bleed"
const PROP_SLEEP = "sleep"
const PROP_MADNESS = "madness"
const PROP_DEAD = "dead"
const PROP_FROST = "frost"
const PROP_CRITICAL = "critical"
const PROP_CRITICAL_PERCENT = "criticalPercent"
const PROP_CRITICAL_DAMAGE = "criticalDamage"
const PROP_CRITICAL_DAMAGE_PERCENT = "criticalDamagePercent"
const PROP_AVOID = "avoid"
const PROP_AVOID_PERCENT = "avoidPercent"
const PROP_MOVE = "moveDistance"
const PROP_REQUIRE_STRENGTH = "requireStrength"
const PROP_REQUIRE_INTELLIGENCE = "requireIntelligence"
const PROP_REQUIRE_DEXTERITY = "requireDexterity"
const PROP_REQUIRE_LUCKY = "requireLucky"
const PROP_STRENGTH_BONUS = "strengthBonus"
const PROP_INTELLIGENCE_BONUS = "intelligenceBonus"
const PROP_DEXTERITY_BONUS = "dexterityBonus"
const PROP_LUCKY_BONUS = "luckyBonus"
const PROP_ANTI_SLASH = "antiSlash"
const PROP_ANTI_MACE = "antiMace"
const PROP_ANTI_PIERCE = "antiPierce"
const PROP_ANTI_FIRE = "antiFire"
const PROP_ANTI_THUNDER = "antiThunder"
const PROP_ANTI_POISON = "antiPoison"
const PROP_ANTI_BLEED = "antiBleed"
const PROP_ANTI_SLEEP = "antiSleep"
const PROP_ANTI_MADNESS = "antiMadness"
const PROP_ANTI_DEAD = "antiDead"
const PROP_ANTI_FROST = "antiFrost"

#resource
const RESOURCE_PLAYER = "Player"
const RESOURCE_PARTNER = "Partner"
const RESOURCE_UI_HEAD_ICON = "HeadIcon"
const RESOURCE_UI_ITEMTYPE_ICON = "ItemTypeIcon"
const RESOURCE_UI_ITEM = "Item"
const RESOURCE_UI_POPUP_CONTAINER = "PopupContainer"
const RESOURCE_UI_POPUP_MENUITEM = "PopupMenuItem"
const RESOURCE_UI_POPUP = "PopupMenuBase"
const RESOURCE_BATTLE_ENTITY = "BattleEntity"
const RESOURCE_BATTLE_WALKABLEHIGHLIGHT = "BattleWalkableHighlight"
const RESOURCE_BATTLE_PATHHIGHLIGHT = "BattlePathHighlight"
const RESOURCE_ICONS = "Icons"

#equipment
const EQUIPMENT_LOC_HEAD = "1"
const EQUIPMENT_LOC_BODY = "2"
const EQUIPMENT_LOC_LEG = "3"
const EQUIPMENT_LOC_HAND = "4"

#item type
const ITEM_TYPE_WEAPON = "2"
const ITEM_TYPE_EQUIPMENT = "3"
const ITEM_TYPE_CONSUMABLE = "1"
const ITEM_TYPE_SPELL = "4"
const ITEM_TYPE_SKILL = "5"
const ITEM_TYPE_TASK = "6"

# consumableItemType
const CONSUMABLE_TYPE_RECOVER_01 = "1"

#popup menu item
const POPUP_USE = "使用"
const POPUP_CANCEL = "取消"
const POPUP_EQUIP = "装备"








